#ifndef GAMEOVERSCENE_H
#define GAMEOVERSCENE_H

#include "../Scene/Scene.h"
#include "../Scene/SceneManager.h"
#include "../InputHandler/input.h"
#include <memory>

class GameOverScene : public GameEngine::Scene {
public:
    GameOverScene(const std::string& name);
    ~GameOverScene() override;

    void OnCreate() override;
    void OnDestroy() override;
    void OnActivate() override;
    void OnDeactivate() override;
    void Update(float deltaTime) override;
    void Render() override;

    // Set game results
    void setScore(int score) { finalScore_ = score; }
    void setGameWon(bool won) { gameWon_ = won; }
    void setTimeElapsed(float time) { timeElapsed_ = time; }

private:
    std::unique_ptr<InputHandler> inputHandler_;
    int finalScore_;
    bool gameWon_;
    float timeElapsed_;
    float animationTime_;

    // Input debouncing
    bool rKeyPressed_;
    bool escKeyPressed_;
    bool mKeyPressed_;

    void renderGameOverTitle();
    void renderResults();
    void renderOptions();
    void checkInput();
};

#endif // GAMEOVERSCENE_H
